% {HTTP_REFERER} wormhole.com [NC, OR]RewriteRule. *-[F] 8. Some requests are blocked by judging the browser header informationThis method can save your bandwidth traffic by preventing some robots or spider crawlers from crawling your website. The code is as follows:Copy code # Blocking users from certain websitesSetEnvIfNoCase ^ User-Agent $. * (craftbot | download | extract | stripper | sucker | ninja | clshttp | webspider | leacher | collect
Header set-cookie "Language = % {Lang} e; Path =/;" Env = Lang
This code sends the set-Cookie header to set the cookie value to the matching item in the second bracket based on the request setting cookie.
123
Rewriteengine onrewritebase/rewriterule ^ (. *) (de | es | fr | it | ja | Ru | En)/$-[CO = Lang :2 2: .yourserver.com: 7200:/]
20. Set custom Response Headers
1234
Header set p3p "policyref = \" http://www.askapache.com/w3c/p3p.x
restrict access to a file
1 19. Set Cookie
Set Cookie through environment variables
Header set Set-Cookie "language=%{lang}e; path=/;" env=lang
This code sends the Set-Cookie header to Set the Cookie value to the matching item in the second bracket based on the request setting Cookie.
RewriteEngine On RewriteBase / RewriteRule ^(.*)(de|es|fr|it|ja|ru|en)/$ - [co=lang:$2:.yourserver.com:7200:/]20. Set custom Response Headers
Header set P3P "policyref=\"http://www.askapache.com/w3c/p3p.xml
index.html, index. php, or index.htm to another page.Copy codeThe Code is as follows: DirectoryIndex business.html
7. Block some undesirable viewers by referencing informationCopy codeThe Code is as follows: # block users from a websiteRewriteEngine onRewriteCond % {HTTP_REFERER} scumbag.com [NC, OR]RewriteCond % {HTTP_REFERER} wormhole.com [NC, OR]RewriteRule. *-[F]
8. Some requests are blocked by judging the browser header informationThis method can save your bandwidth traffic by preventing s
Deny from all
AuthType Basic
AuthName "Characterology Student authcate"
Authldap on
Authldapserver ldap://directory.characterology.com/
Authldapbase "Ou=student, o=characterology University, C=au"
Require Valid-user
Satisfy any
19. Set Cookies
Setting cookies through environment variables
Copy Code code as follows:
Header set Set-cookie "LANGUAGE=%{LANG}E; path=/; "Env=lang
Sets a cookie based on the request that sends the Set-cookie header to set the coo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.